Method of embedding a plurality of different two-dimensional codes in an image

ABSTRACT

The purpose of the present invention is to prevent a two-dimensional code to be additionally embedded from corrupting a two-dimensional code which has been embedded when a document in which the two-dimensional code has been embedded is copied or when a document in which the two-dimensional code has been embedded is overlaid on form data in which the two-dimensional code has been embedded. In the present invention, when it is detected that a second two-dimensional code is embedded in an input image, the input image is printed without overlay of a first two-dimensional code thereon. Furthermore, when form data for overlaying is stored, when it is detected that a third two-dimensional code is embedded in the form data or when it is detected that a second two-dimensional code is embedded in an input image, the input image is output without overlay of a first two-dimensional code thereon.

This application is a continuation of U.S. patent application Ser. No.13/354,538, filed Jan. 20, 2012, allowed Apr. 9, 2013, which is adivisional of U.S. patent application Ser. No. 12/202,506, filed Sep. 2,2008, allowed Sep. 30, 2011, and which matured into U.S. Pat. No.8,115,966, issued Feb. 14, 2012.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method for embedding a plurality ofdifferent two-dimensional codes in an image, and in particular to amethod for embedding a new two-dimensional code in an image so as not tocorrupt a two-dimensional code which has already been embedded in theimage.

2. Description of the Related Art

A two-dimensional code technology exists for embedding electronic datain a paper by printing an image pattern generated by encoding theelectronic data, optically reading the image, and extracting theelectronic data. It has become possible to embed more electronicinformation in a paper by embedding information using a two-dimensionalcode.

Since a two-dimensional code can be embedded and read with one machinewhen a copy machine having both a printing function and a scanningfunction is used, systems peculiar to a copy machine using atwo-dimensional code have been developed. For example, a system existsfor embedding information indicative of a confidential document in aprintout as a two-dimensional code, determining whether or not theprintout is a confidential document prohibited from being copied whencopying the printout in an image forming device, and stopping the copyoperation if the printout is a confidential document (Japanese PatentLaid-Open No. 2002-305646). In addition, a system exists for embedding ausage log of an image forming device in a paper document and using theusage log to track the document. Furthermore, a system exists forembedding a two-dimensional code as image information itself andprinting an original image on the basis of the image informationacquired by scanning the two-dimensional code (Japanese Patent Laid-OpenNo. 2004-153568). Furthermore, a system exists for previously storing adocument in an image forming device, synthesizing the previously storeddocument and another document, and printing a synthesized image(Japanese Patent Laid-Open No. 2000-122837).

Optimal embedding methods are selected and used in accordance with theintended use. Two-dimensional code embedding methods can be classifiedinto two types as follows.

Type Description Features (A) A Resilience of a Iterativetwo-dimensional two-dimensional code is embedding code is embedded highbecause the method iteratively in two-dimensional code is a wholesurface iteratively embedded in a of a document. document. Informationcan be restored even if part of the two-dimensional codes is lost. (B) AA lot of information can be Simple two-dimensional embedded becauseembedding code is embedded information is embedded in method in part ofa high density. surface of Information can not be document. restored ifpart of the two-dimensional code is lost.

FIG. 1 shows a document in which a two-dimensional code is embeddedusing the iterative embedding method and a document in which atwo-dimensional code is embedded using the simple embedding method.

Reference numeral 10 denotes a document in which two-dimensional codesare embedded by the iterative embedding method. Each of rectanglesenclosed with dotted lines in the figure is an information embeddedtile. The dotted lines are not actually printed, but are shown in thefigure to plainly show the presence of the information embedded tiles.The same information is embedded in all of the information embeddedtiles printed in the whole surface of the document 10, so that theinformation can be extracted even from a part of the surface of thedocument. Thus, a document in which two-dimensional codes are embeddedby the iterative embedding method is resilient to stains, wrinkles, etc.Furthermore, the iterative embedding method prints two-dimensional codesin a whole surface of a document and therefore often generates a patternusing dots, lines, etc. for information embedding in order to reduce thevisibility of the two-dimensional codes.

On the other hand, reference numeral 20 denotes a document in which atwo-dimensional code is embedded by the simple embedding method. Thetwo-dimensional code is printed on the lower right of the document inthe figure. In the case of the simple embedding method, if part of atwo-dimensional code is chipped or the two-dimensional code gets dirty,information can not be extracted from the two-dimensional code. However,the simple embedding method has the advantage of embedding a largeamount of information in a document because it generates a high densitytwo-dimensional code.

A system for determining whether or not a document is confidential oftenuses the iterative embedding method. On the other hand, a system forembedding image information for use handles a lot of information andtherefore often uses the simple embedding method.

Next, the outline of a system which is proposed in Japanese PatentLaid-Open No. 2000-122837 will be discussed. The system performs overlay(synthesizing) a previously stored document onto another document, andprinting the thus acquired synthesized image. FIG. 11 is a block diagramshowing a data flow of the system proposed in Japanese Paten Laid-OpenNo. 2000-122837. In FIG. 11, reference numeral 1003 denotes a ROM(program ROM). The ROM 1003 stores a control program including thefollowing modules.

Reference numeral 201 denotes a form generating module for generating aform file 207. Reference numeral 202 denotes an embedded data generatingmodule for generating an embedded data file 208. Reference numeral 203denotes a composite file generating module for generating a compositeform file 209 from the multiple form files 207 and embedded data files208. Reference numeral 204 denotes a memory expansion module forexpanding the composite form file. Reference numeral 205 denotes asequential analysis processing module for sequentially analyzing theexpanded composite form file. Reference numeral 206 denotes an overlaymodule for allowing a printer to perform overlay printing according tothe settings acquired by analyzing the composite form file. The memoryexpansion module 204, the sequential analysis module 205, and theoverlay module 206 are collectively referred to as a run time librarymodule or an overlay specifying module.

Reference numeral 1002 denotes a RAM functioning as a memory into whichthe above modules are loaded, and a form object is stored therein. Theform object is form data and embedded data (field data). Furthermore,the RAM 1002 is also a work area.

Reference numeral 1009 denotes a hard disk in which a database, anembedded data file, a form file, and a composite form file are stored.Reference numeral 207 denotes a file consisting of form data generatedby the form generating module 201. Reference numeral 208 denotes anembedded data file consisting of embedded data (referred to as fielddata or appended data) generated by the embedded data generating module203. Reference numeral 209 denotes a composite form file defined frommultiple form files generated by the composite file generating module203. The composite form file 209 is defined as an information file whichhas both of form information managing multiple types of forms as onerelating continuous form, and output information of paper cassettes foroutput for each of the forms, and the like. Reference numeral 210denotes a database to which the embedded data generating module 202makes an access to generate the embedded data file 208 as discussedlater.

Overlay data (including form data and embedded data) generated byrespective program modules stored in the ROM 1003 is passed to an OS.The OS associates a data function (GDI function) output from anapplication with a common data function (DDI function) which can berecognized by an output device and outputs the data function to aprinter driver 211 designated by the application. A function associationcomponent for processing this is part of the function of the OS andcorresponds to a GDI of Windows. This function is publicly known andtherefore the detail description regarding the function is omitted.

The printer driver 211 analyzes a data function (DDI function) inputfrom the function association component of the OS and generates printdata using a page description language (PDL) capable of printprocessing. The generated print data is output and sent to the printeras a printing device. The printer generates bitmap data as specified bythe print data and prints out it. The printer is capable of performingoverlay. The printer receives print data for a form and print data forembedding, performs overlay processing, and then prints thus acquiredprint data. If the printer has no overlay function, the printer driver211 may generate print data of all pages by performing overlayprocessing and send the print data to the printer.

In this way, systems using two-dimensional codes use varioustwo-dimensional codes according to their objects and therefore may usemultiple different two-dimensional codes at the same time. In otherwords, it is possible to print multiple different two-dimensional codeson the same paper. When multiple different two-dimensional codes areused at the same time, the two-dimensional codes thereof interfere witheach other and thereby information may not be able to be read from eachof the two-dimensional codes. In other words, if a system using multipledifferent two-dimensional codes at the same time, when copying adocument in which a two-dimensional code has already been embedded,performs printing while adding a new two-dimensional code thereon, thetwo-dimensional code already embedded may be corrupted.

Furthermore, systems using two-dimensional codes use varioustwo-dimensional codes according to their objects and therefore may usemultiple different two-dimensional codes at the same time. For example,a system exists for overlaying a document in which a two-dimensionalcode has already been embedded onto form data in which a two-dimensionalcode has already been embedded, and then prints thus acquired image.This printing system may not be able to read information from each ofthe two-dimensional codes because the two-dimensional codes thereofinterfere with each other. In other words, after a document in which atwo-dimensional code has already been embedded is overlaid onto formdata in which a two-dimensional code has already been embedded, if a newtwo-dimensional code is added thereon for printing, the two-dimensionalcodes already embedded may be corrupted.

Systems making a form overlaying function unusable when making afunction using a two-dimensional code effective in order to prevent thetwo-dimensional codes already embedded from being corrupted can beeasily considered, but may impair user's convenience.

SUMMARY OF THE INVENTION

An object of the present invention is to prevent a two-dimensional codeto be newly embedded from corrupting a two-dimensional code alreadyembedded, when copying a document in which the two-dimensional code hasalready been embedded.

Further, another object of the present invention is to prevent atwo-dimensional code to be newly embedded from corrupting atwo-dimensional code already embedded, when overlaying a document inwhich a two-dimensional code is embedded onto form data in which atwo-dimensional code has already been embedded and then printing thusacquired image.

A device according to the present invention includes a specifyingcomponent configured to specify overlay of a coded image onto an inputimage, and a control component configured to specify, when a coded imagehas already been embedded in the input image before overlaying a codedimage for overlay onto the input image, whether or not to overlay thecoded image for overlay onto the input image depending on the type ofthe coded image for overlay.

A device according to the present invention includes, when used in acase that a coded image as the type to be iteratively embedded into anentire input image has already been embedded in the input image, acomponent configured to perform control not to overlay a coded image tobe overlaid onto the input image if the type of the coded image to beoverlaid onto the input image is equal to the type of the coded imageiteratively embedded into the entire input image, a component configuredto determine whether or not a coded image to be overlaid onto the inputimage overlaps the coded image embedded in the input image if the typeof the coded image to be overlaid onto the input image is not equal tothe type of the coded image iteratively embedded into the entire inputimage, and a component configured to specify whether or not to overlaythe coded image to be overlaid onto the input image, depending on thesize of an area, of the coded image embedded in the input image, wherethe coded image to be overlaid does not overlap, when it is determinedthat the overlap exists.

A method according to the present invention includes the steps ofspecifying overlay of a coded image onto an input image, and controllingof specifying, when a coded image has already been embedded in the inputimage before overlaying a coded image onto the input image, whether ornot to overlay the coded image for overlay onto the input imagedepending on the type of the coded image for overlay.

A method according to the present invention includes the steps of, whenused in a case that a coded image as the type to be iteratively embeddedinto an entire input image has already been embedded in the input image,performing control not to overlay a coded image to be overlaid onto theinput image if the type of the coded image to be overlaid onto the inputimage is equal to the type of the coded image iteratively embedded intothe entire input image, determining whether or not a coded image to beoverlaid on the input image overlaps the coded image embedded in theinput image if the type of the coded image to be overlaid onto the inputimage is not equal to the type of the coded image iteratively embeddedinto the entire input image, and specifying whether or not to overlaythe coded image to be overlaid onto the input image, depending on thesize of an area, of the coded image embedded in the input image, wherethe coded image to be overlaid does not overlap, when it is determinedthat the overlap exists.

A computer-readable recording medium according to the present inventionrecords a program executing the above methods.

According to the present invention, it becomes possible to prevent atwo-dimensional code already embedded from being corrupted when copyinga document in which a two-dimensional code has already been embedded.

Furthermore, according to the present invention, it becomes possible toextract, when copying a document in which a two-dimensional code hasalready been embedded, information from both of a two-dimensional codealready embedded and a two-dimensional code newly embedded, even if anew two-dimensional code is added and thus acquired image is printed.

Furthermore, according to the present invention, it becomes possible toprevent a two-dimensional code already embedded from being corrupted,when overlaying a document in which a two-dimensional code is embeddedonto form data in which a two-dimensional code has already been embeddedand then printing thus acquired image.

Furthermore, according to the present invention, it becomes possible toprevent a two-dimensional code from being corrupted, when printing printdata acquired by overlaying a document in which a two-dimensional codeis embedded onto form data in which a two-dimensional code has alreadybeen embedded, even if a new two-dimensional code is added and thusacquired print data is printed.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments (with reference to theattached drawings).

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a document in which a two-dimensional code is embeddedusing the iterative embedding method and a document in which atwo-dimensional code is embedded using the simple embedding method;

FIG. 2 shows an example of information embedding by the iterativeembedding method;

FIG. 3 is a flow chart showing the flow of processing to extract atwo-dimensional code embedded in an input image by the iterativeembedding method;

FIG. 4 is a flow chart showing the flow of processing to extract atwo-dimensional code added in an input image;

FIG. 5 is a flow chart showing a processing of a first embodiment;

FIG. 6 is a flow chart showing the flow of a determining process ofdetermining whether or not a first two-dimensional code can be printed,in the first embodiment;

FIG. 7 is a flow chart showing the flow of a determining process ofdetermining whether or not a first two-dimensional code can be printed,in a second embodiment;

FIG. 8 shows the state that a first two-dimensional code is printed on asecond two-dimensional code;

FIG. 9 is a flow chart showing the processing of a third embodiment;

FIG. 10 is a diagram illustrating a search for an area where the firsttwo-dimensional code is embedded;

FIG. 11 is a block diagram showing a system data flow in a conventionalart;

FIG. 12 is a flow chart showing the flow of a form data registrationprocessing in a fourth embodiment;

FIG. 13 is a flow chart showing the flow of a form overlay and printprocessing in the fourth embodiment;

FIG. 14 is a flow chart showing the flow of a form overlay and printprocessing in a fifth embodiment; and

FIG. 15 shows combinations of the presence or absence of a setting foroverlaying previously registered form data onto print data and thepresence or absence of a setting for embedding of a two-dimensionalcode.

DESCRIPTION OF THE EMBODIMENTS

First, an information extracting method corresponding to an informationembedding method used in the present embodiments will be discussed.

As discussed above, two types of information embedding methods exist,which are the iterative embedding method and the simple embeddingmethod. Information extracting methods corresponding to the respectiveinformation embedding methods will be discussed.

In the following description, information extracting is performed by animage forming device. The image forming device extracts information fromimage read by a scanner using the information extracting methods. Theimage forming device includes a CPU and a storage. The CPU performsprocessing discussed as follows by reading a program and data stored inthe storage.

(A) Iterative Embedding Method

An example of extracting information which has already been embedded ona document by printing dots as two-dimensional codes on the document,using the iterative embedding method, will be discussed. The iterativeembedding method prints two-dimensional codes on a whole surface of adocument and therefore an embedding method with visibility as low aspossible is desired. In the embodiments, a two-dimensional code shown inFIG. 2 is taken as an example. In this two-dimensional code, dots areprinted near intersections of virtual grids 202 drawn on a document asshown in FIG. 2 and information is embedded by the displacements of thedots from the intersections.

FIG. 3 is a flow chart showing the flow of processing to extract atwo-dimensional code which has already been embedded in an input imageby the iterative embedding method. When an image read by the scanner isinput, an image forming device scans the input image to detect dotsincluded in the input image (S301).

The image forming device acquires dot information such as absolutecoordinates, sizes, and densities of all dots detected (S302).

The image forming device performs half-tone removal processing to deletedots other than information dots related to embedded information fromthe detected dots on the basis of acquired dot information in order todetect only the information dots (S303).

The image forming device measures distances between the detectedinformation dots and dots adjacent to the information dots and acquiresa grid interval in order to reproduce grids. Furthermore, the imageforming device measures angles between adjacent information dots and allof the information dots and acquires rotation angles of the grids(S304). The image forming device measures relative positions of theinformation dots relative to intersections of the grids (202 in FIG. 2)after acquiring the grid intervals and the rotation angles.

The image forming device determines a repetition size of data areas inwhich data is embedded iteratively in order to acquire the positions andsizes of respective data areas (S305).

The image forming device acquires the positions and sizes of informationdots existing in the data areas in which data is embedded repeatedly(S306) and extracts embedded data (S307). Finally, the image formingdevice performs error correction processing on the extracted data (S308)to acquire embedded information.

Discussed above is one example of information extracting methodcorresponding to the iterative embedding method shown in theembodiments. The present invention is not limited to this and may useinformation extracting methods corresponding to other iterativeembedding methods.

(B) Simple Embedding Method

An extracting method for extracting a two-dimensional code (QR code)which has already been embedded by the simple embedding method will bediscussed.

FIG. 4 is a flow chart showing the flow of processing to extract atwo-dimensional code added in an input image.

When an image read by the scanner is input, the image forming devicescans the input image to detect the position of a predeterminedtwo-dimensional code (S401). The position of the two-dimensional code isdetected using the same clipped symbol pattern arranged at three of thefour corners of the two-dimensional code.

The image forming device restores format information adjacent to theclipped symbols and acquires error correction levels and mask patternsapplied to the symbols (S402).

The image forming device releases the masking by operating XOR of theencoded area bit patterns using the acquired mask patterns (S403).

The image forming device reads a symbol character according to anarrangement rule corresponding to a model and restores the data anderror correction code of a message (S404).

The image forming device applies the error correction code to therestored data and determines whether or not an error exists in therestored data (S405), and corrects the error when an error exists in thedata (S406).

The image forming device applies an error detection code to theerror-corrected data and determines whether or not an error exists inthe data (S407). When no error exists in the data, the image formingdevice determines that decoding of the extracted data was successful andoutputs the data (S408). In contrast, when an error exists in the data,the image forming device determines that decoding of the extracted datawas failed and finishes the processing (S409).

Discussed above is one example of information extracting methodcorresponding to the simple embedding method shown in the embodiments.The present invention is not limited to this and may use informationextracting methods corresponding to other simple embedding methods.

Next, problems in the case that multiple two-dimensional codes areprinted on the same paper will be discussed.

Here discussed are problems in the case that when a document on which atwo-dimensional code has already been printed is copied and a newtwo-dimensional code is printed thereon, information is extracted fromeach of the two-dimensional codes printed on the copy of the document.In the following description, a two-dimensional code already printed ona document is referred to as a second two-dimensional code (second codedimage), and a two-dimensional code to be newly printed on the copy ofthe document is referred to as a first two-dimensional code (first codedimage).

The following Table 2 shows embedding methods of a first two-dimensionalcode, embedding methods of a second two-dimensional code, and extractionresults acquired when information is extracted from a document in whichthe two two-dimensional codes have already been embedded. “∘” in theextraction result column represents that information can be extracted,“x” represents that information can not be extracted, and “Δ” representsthat information can be extracted in some cases and can not be extractedin the other cases.

TABLE 2 Embedding Method Extraction Result Second First Second Firsttwo-dimensional two-dimensional two-dimensional two-dimensional codecode code code Description 1 Iterative Iterative x x Information ofembedding embedding both codes can method method not be restored becausetwo-dimensional codes overlap each other in a whole surface of adocument. 2 Iterative Simple Δ ∘ Second embedding embeddingtwo-dimensional method method codes are partially corrupted by a firsttwo-dimensional code. However, if some areas are remained in secondtwo-dimensional codes, information of second two-dimensional codes canbe restored. 3 Simple Iterative x ∘ Information of embedding embeddingthe second method method two-dimensional code can not be restoredbecause a first two-dimensional code is printed on a secondtwo-dimensional code. 4 Simple Simple Δ Δ If both codes do embeddingembedding not overlap each method method other, information can berestored.

As understood from Table 2, when two-dimensional codes are printedoverlapping each other, information can not be restored. Since whetherinformation can be restored or not depends on the printing order of thetwo-dimensional codes and the characteristics of the embedding methodsthereof, embodiments will be discussed below with reference to Table 2.

First Embodiment

In the first embodiment, the processing of embedding control will bediscussed which controls not to allow a second two-dimensional codealready embedded in the document to overlap a first two-dimensional codeto be newly embedded, when embedding information during copying usingthe above information embedding technology.

FIG. 5 is a flow chart showing the processing of the first embodiment.

A scanner scans a document and sends a scanned image to an image formingdevice (S501).

The image forming device determines, when receiving the image from thescanner, whether or not a second two-dimensional code has already beenembedded in the input image (scanned image) (S502). When no secondtwo-dimensional code has already been embedded in the input image, theimage forming device continues the copy operation and performs printing(S507). In contrast, when a second two-dimensional code has already beenembedded in the input image, the image forming device identifies theposition and embedding method of the second two-dimensional code (S503).

The image forming device determines whether embedding a firsttwo-dimensional code which is a new two-dimensional code is specified asa setting for copying (S504). When embedding a first two-dimensionalcode is not specified, the image forming device continues the copyoperation and performs printing (S507). In contrast, when embedding afirst two-dimensional code is specified, the image forming devicedetermines whether or not the first two-dimensional code can be printed(S505).

Here, a determining process (S505) for determining whether or not afirst two-dimensional code can be printed (embedded) will be discussedin detail.

FIG. 6 is a flow chart showing the flow of the determining process(S505) for determining whether or not a first two-dimensional code canbe printed.

The image forming device acquires the type of the embedding method of asecond two-dimensional code (an iterative embedding method or a simpleembedding method) and the positional information of the printing area ofthe second two-dimensional code (S601).

The image forming device acquires the type of the embedding method of afirst two-dimensional code and the positional information of theprinting area of the first two-dimensional code (S602).

If the embedding method of the first two-dimensional code is aniterative embedding method, the image forming device determines that thefirst two-dimensional code can not be printed (S606), because the firsttwo-dimensional code may corrupt the second two-dimensional code whenthe first two-dimensional code is printed on the second two-dimensionalcode, as shown in Table 2.

If the embedding method of the first two-dimensional code is a simpleembedding method, the image forming device determines whether or not theprinting area of the first two-dimensional code overlaps the printingarea of the second two-dimensional code (S604). If the printing area ofthe first two-dimensional code overlaps the printing area of the secondtwo-dimensional code as the result of the determination, the imageforming device determines that the first two-dimensional code can not beprinted (S606), because the second two-dimensional code may be corruptedwhen the first two-dimensional code is embedded, as shown in Table 2. Incontrast, if the printing area of the first two-dimensional code doesnot overlap the printing area of the second two-dimensional code, theimage forming device determines that the first two-dimensional code canbe printed (S605) and then finishes the processing.

The description returns to the flow chart shown in FIG. 5.

In S505, if it is determined that the first two-dimensional code can beprinted, the image forming device overlays the first two-dimensionalcode onto the second two-dimensional code in the input image (S506) andthen performs printing (S507). In contrast, if it is determined that thefirst two-dimensional code can not be printed, the image forming devicecancels a job (S508). Note that, the image forming device may copy theinput image as it is without overlaying the first two-dimensional codeinstead of canceling the job. Furthermore, the image forming device mayinclude a component for determining whether to cancel the job when it isdetermined that the first two-dimensional code can not be printed, basedon a setting value by a user.

As discussed above, according to the first embodiment, when a documentin which a two-dimensional code has already been embedded is copied,embedding of a new two-dimensional code can be controlled so as not tocorrupt the two-dimensional code.

Second Embodiment

In the second embodiment, the processing of embedding control guaranteesa minimum area where information can be restored from a secondtwo-dimensional code and a first two-dimensional code when theinformation is embedded using the above information embedding technologywhen the document is copied.

In the processing according to the second embodiment, a determiningprocess for determining whether or not a first two-dimensional code canbe printed (S505) is different from that shown in FIG. 5, and otherprocessing is the same as that shown in FIG. 5. Thus, the determiningprocess for determining whether or not a first two-dimensional code canbe printed (S505) will be discussed in detail.

FIG. 7 is a flow chart showing the flow of the determining process fordetermining whether or not the first two-dimensional code can be printed(S505).

The processing of S701 to S703 is the same as that of S601 to S603 shownin FIG. 6 and therefore the description thereof is omitted.

In the first embodiment, in S604, if the printing area of the firsttwo-dimensional code overlaps that of the second two-dimensional code,it is determined unconditionally that the first two-dimensional code cannot be printed assuming that information can not be restored from thesecond two-dimensional code. Because when the second two-dimensionalcode is embedded using the iterative embedding method, the secondtwo-dimensional code is printed in the whole surface of a document andtherefore the first two-dimensional code can not be embedded so as notto overlap the second two-dimensional code. However, according to thecharacteristic of the iterative embedding method, there is a case thateven if part of the areas of the second two-dimensional code embeddedusing the iterative embedding method is lost, information can berestored from the remaining areas. In other words, if the embeddingmethod of the first two-dimensional code is the simple embedding method,there is a case that even if the first two-dimensional code is printedon the second two-dimensional code, information can be restored from thefirst two-dimensional code and the second two-dimensional code (the case2 in Table 2). However, a minimum area to restore information isnecessary even for the iterative embedding method. In the secondembodiment, a determining processing using the characteristic of theiterative embedding method is performed.

If it is determined that the embedding method of the firsttwo-dimensional code is equal to the simple embedding method in S703,the image forming device proceeds to S704.

The image forming device determines whether or not the printing area ofthe first two-dimensional code overlaps that of the secondtwo-dimensional code (S704), and proceeds to S705 if an overlap exists.

The image forming device acquires the number of areas of the secondtwo-dimensional code which do not overlap the area of the firsttwo-dimensional code on the basis of the positional information of thesecond two-dimensional code and the positional information of the firsttwo-dimensional code, which are acquired in S701 and S702 (S705). FIG. 8shows the state that a first two-dimensional code 21 is printed on asecond two-dimensional code 11. In the figure, the area on which acircle is attached (information embedding tile) is the area where bothareas do not overlap each other. As understood from the figure, if afirst two-dimensional code is embedded by the simple embedding method ina document in which a second two-dimensional code has already beenembedded, the overwriting overlaying method is used. The overwritingoverlaying means that pixels constituting the first two-dimensional codeare selected. On the other hand, if a first two-dimensional code isembedded by the iterative embedding method in a document in which asecond two-dimensional code has already been embedded, the OR overlayingmethod is used. The OR overlaying means that darker pixels are selectedamong pixels constituting the first two-dimensional code and pixelsconstituting the second two-dimensional code.

The image forming device compares the number of areas of the secondtwo-dimensional code which do not overlap the first two-dimensional codewith a predetermined value (S706). If the number of areas of the secondtwo-dimensional code which do not overlap the first two-dimensional codeis larger than the predetermined value, the image forming devicedetermines that information can be restored even if the firsttwo-dimensional code is printed on the second two-dimensional code anddetermines that the first two-dimensional code can be printed. Incontrast, if the number of areas of the second two-dimensional codewhich do not overlap the first two-dimensional code is less than thepredetermined value, the image forming device determines that theinformation of the second two-dimensional code can not be restored whenthe first two-dimensional code is printed and determines that the firsttwo-dimensional code can not be printed (S707).

The description returns to the flow chart shown in FIG. 5.

In S505, if it is determined that the first two-dimensional code can beprinted, the image forming device overlays the first two-dimensionalcode onto the second two-dimensional code in the input image (S506) andthen performs printing (S507). In contrast, if it is determined that thefirst two-dimensional code can not be printed, the image forming devicecancels the job (S508). Note that, the image forming device may copy theinput image as it is without overlaying the first two-dimensional codeinstead of canceling the job. Furthermore, the image forming device mayhave a component for determining whether to cancel the job if it isdetermined that the first two-dimensional code can not be printed, basedon a setting value by a user.

As discussed above, according to the second embodiment, when a documentin which a two-dimensional code has already been embedded is copied, anew two-dimensional code is embedded in consideration of a minimum areawhere information can be restored from the two-dimensional code, so thatmany types of two-dimensional codes can be embedded.

Third Embodiment

The first and second embodiments perform control to determine whether ornot a specified new two-dimensional code (first two-dimensional code)can be printed during copying and not to print the new two-dimensionalcode if it is determined that the new two-dimensional code can not beprinted. On the other hand, the third embodiment performs control toadjust the print position of a two-dimensional code newly embedded in adocument according to the area of a two-dimensional code (secondtwo-dimensional code) already embedded in the document.

FIG. 9 is a flow chart showing the processing of the third embodiment.

The processing of S901 to S903 is the same as that of S501 to S503 shownin FIG. 5 and therefore the description thereof is omitted. The imageforming device determines whether or not embedding a firsttwo-dimensional code which is a new two-dimensional code is specified asa setting for copying (S904). If embedding a first two-dimensional codeis not specified, the image forming device continues the copy operationand performs printing (S910). In contrast, if embedding a firsttwo-dimensional code is specified, the image forming device proceeds toS905.

The image forming device acquires the size of an output document (S905).

The image forming device determines whether the embedding method of thefirst two-dimensional code is equal to the simple embedding method orthe iterative embedding method (S906), and proceeds to S907 in the caseof the simple embedding method while proceeding to S911 in the case ofthe iterative embedding method.

If the embedding method of the first two-dimensional code is equal tothe iterative embedding method, the image forming device overlays thefirst two-dimensional code onto the second two-dimensional code so asnot to embed the first two-dimensional code in the printing area of thesecond two-dimensional code (S911) and then performs printing (S910). Incontrast, if the embedding method of the first two-dimensional code isequal to the simple embedding method, the image forming device searchesan area where the first two-dimensional code is embedded so as not tooverlap the second two-dimensional code (S907), and determines whetheror not the first two-dimensional code can be embedded in the searchedarea (S908).

FIG. 10 depicts the search for an area where the first two-dimensionalcode is embedded. The search is performed by determining whether or nota first two-dimensional code 23 can be embedded in any one of the eightareas ((1) to (8)) around a second two-dimensional code 22. The imageforming device determines it on the basis of the positional coordinateand size of the second two-dimensional code 22, the size of the firsttwo-dimensional code 23, and the size of the printed document. If it isdetermined that it can be embedded in any one of the eight areas, theimage forming device embeds the first two-dimensional code in the areawhere it can be embedded, and then performs printing (S909, S910). Incontrast, if it is determined that it can not be embedded in any of theeight areas, the image forming device determines that the firsttwo-dimensional code can not be embedded and cancels the job (S912).Note that, the image forming device may copy the input image as it iswithout overlaying the first two-dimensional code instead of cancelingthe job. Furthermore, the image forming device may have a component fordetermining whether or not the job is canceled if it is determined thatthe first two-dimensional code can not be printed, based on a value setby a user.

In the third embodiment, the image forming device determines whether thefirst two-dimensional code can be embedded in any one of the eight areasshown in FIG. 10, but may perform any other determining method ordesignate embedding position. For example, the image forming device maybe configured so as to allow a user who has provided a copy setting todesignate an embedding position of the first two-dimensional code.

As discussed above, according to the third embodiment, when a documentin which a two-dimensional code has already been embedded is copied, thetwo-dimensional code already embedded can be prevented form beingcorrupted by embedding a new two-dimensional code. In addition, since anew two-dimensional code is embedded so as not to overlap the area wherethe two-dimensional code has already been embedded, many types oftwo-dimensional codes can be embedded.

Fourth Embodiment

In the fourth embodiment, processing is shown which overlays a documentin which a two-dimensional code has already been embedded onto form datain which a two-dimensional code has already been embedded, using theabove information embedding technology. Specifically, the processing ofembedding control is shown which controls not to overlap atwo-dimensional code already embedded in the form data onto atwo-dimensional code already embedded in the document.

FIG. 12 is a flow chart showing the processing of the fourth embodimentperformed when form data is registered.

An image forming device receives form data from a host computer such asa personal computer or a server (S1201).

When receiving the form data from the host computer, the image formingdevice determines whether or not a two-dimensional code has already beenembedded in the input image (form data) (S1202). When no two-dimensionalcode has already been embedded in the input image, the image formingdevice continues the form registering operation (S1205). In contrast,when a two-dimensional code has already been embedded in the inputimage, the image forming device identifies the position and embeddingmethod of the two-dimensional code (S1203). Next, the image formingdevice makes a layer of only the two-dimensional code (two-dimensionalcode layer such as a digital watermark information layer) on the basisof the position and embedding method of the two-dimensional codeidentified in S1203 and stores the two-dimensional code layer in astorage (S1204). The image forming device then makes a layer (imagelayer) of only data including no two-dimensional code and stores thelayer in the storage (S1205).

The two-dimensional code in the fourth embodiment may be either a firsttwo-dimensional code or a second two-dimensional code.

Next, the operation of the image forming device in the fourth embodimentwill be discussed with reference to FIG. 13.

The image forming device has a function of preventing a two-dimensionalcode included in form data registered in the processing shown in FIG. 12from overlapping a two-dimensional code included in image data to beoverlaid on the form data when the image data is input to the imageforming device.

In FIG. 13, the image forming device receives print data for printingfrom the host computer (S1301). The image forming device determineswhether overlaying the form data registered in FIG. 12 is specified as asetting for printing (S1302). When overlaying the form data is notspecified, the image forming device continues the printing operation andthen performs printing (S1308). In contrast, when overlaying the formdata is specified, the image forming device determines whether atwo-dimensional code has already been embedded in the print data(S1303). If no two-dimensional code has already been embedded in theprint data, the image forming device proceeds to S1305. If atwo-dimensional code has already been embedded in the print data, theimage forming device identifies the type and position of thetwo-dimensional code in the print data (S1304). Next, the image formingdevice determines whether a two-dimensional code has already beenembedded in the form data (S1305). If no two-dimensional code has beenembedded in the form data, the image forming device overlays the formdata onto the print data (S1309). If a two-dimensional code has alreadybeen embedded in the form data, the image forming device determineswhether the two-dimensional code in the form data overlaps thetwo-dimensional code in the print data when overlaying the form dataonto the print data (S1306). If the two-dimensional code in the formdata does not overlap the two-dimensional code in the print data, theimage forming device overlays the form data on the print data (S1309).If the two-dimensional code in the form data overlaps thetwo-dimensional code in the print data, the image forming deviceoverlays data (image layer) including no two-dimensional code in theform data on the print data (S1307). In other words, the image formingdevice does not overlay the two-dimensional code in the form data. Next,the image forming device prints the print data overlaid in S1307(S1308).

Here, processing performed when the image forming device receives printdata from a host computer is discussed. However, also when the imageforming device receives copied data for copying from a scanner connectedwith the image forming device, the same units as that of the embodimentmay be used.

As discussed above, according to the fourth embodiment, two-dimensionalcode embedding can be controlled so as not to corrupt a two-dimensionalcode when printing print data in which a two-dimensional code isembedded in the state that overlaying form data in which atwo-dimensional code is embedded on print data is specified.

Fifth Embodiment

In the fifth embodiment, the operation of an image forming device whichhas been set to overlay previously registered form data onto the printdata and embed a two-dimensional code (setting of adding atwo-dimensional code) will be discussed. FIG. 15 shows combinations ofthe presence or absence of a setting for overlaying the previouslyregistered form data onto the print data and the presence or absence ofa setting for embedding of a two-dimensional code, and shows printresults.

In FIG. 15, the upper part above the oblique line of each cell shows animage data configuration, and cells in which two or more components arewritten as the image data configuration show that the images overlappingeach other are printed. The lower part below the oblique line of eachcell shows a two-dimensional code configuration. Cells in which two ormore components are written as the two-dimensional code configurationrepresent that when the two-dimensional codes do not overlap, all of thetwo-dimensional codes are printed. Furthermore, the cells represent thatwhen part of the two-dimensional codes overlap each other,two-dimensional codes which do not overlap each other are printed.Furthermore, the cells represent that when all of the two-dimensionalcodes overlap each other, any one of the two-dimensional codes isprinted. The first column of the row A and the first column of the row Brepresent the presence or absence of image data in the print data andthe presence or absence of a two-dimensional code in the print data, therow C represents the presence or absence of image data in the form dataand the presence or absence of a two-dimensional code in the form data,and the row D represents the presence or absence of image data for whichembedding has been set and the presence or absence of a two-dimensionalcode for which embedding has been set. The second to seventh columns ofthe row A and the second to seventh columns of the row B represent theconfigurations of image data and a two-dimensional code of data whichhas been printed.

Next, the operation of the image forming device in the fifth embodimentwill be discussed with reference to FIG. 14.

The image forming device has a function of preventing two-dimensionalcodes from overlapping each other when form data registered in theprocessing shown in FIG. 12 and image data to be overlaid on the formdata are input to the image forming device. Specifically, the imageforming device has a function of preventing a two-dimensional codeincluded in the form data, a two-dimensional code included in the imagedata, and a two-dimensional code to which forced embedding is set forthe image forming device from overlapping each other.

In FIG. 14, the image forming device receives print data from a hostcomputer (S1401). The image forming device determines whether overlayingthe form data registered in FIG. 12 is specified as a setting forprinting (S1402). If overlaying the form data is not specified, theimage forming device proceeds to S1408. In contrast, if overlaying theform data is specified, the image forming device determines whether atwo-dimensional code has already been embedded in the print data(S1403). If no two-dimensional code has already been embedded in theprint data, the image forming device proceeds to S1405. If atwo-dimensional code has already been embedded in the print data, theimage forming device identifies the type and position of thetwo-dimensional code in the print data (S1404).

Next, the image forming device determines whether a two-dimensional codehas already been embedded in the form data (S1405). If notwo-dimensional code has been embedded in the form data, the imageforming device overlays the form data onto the print data (S1412). If atwo-dimensional code has already been embedded in the form data, theimage forming device determines whether the two-dimensional code in theform data overlaps the two-dimensional code in the print data whenoverlaying the form data on the print data (S1406). If thetwo-dimensional code in the form data does not overlap thetwo-dimensional code in the print data, the image forming deviceoverlays the form data onto the print data (S1412). If thetwo-dimensional code in the form data overlaps the two-dimensional codein the print data, the image forming device overlays data (image layer)including no two-dimensional code in the form data onto the print data,and does not overlay the two-dimensional code in the form data onto theprint data (S1407).

Next, the image forming device determines whether embedding (forcedembedding) of a two-dimensional code has been set for the own device(S1408). If the forced embedding has not been set, the image formingdevice prints the print data overlaid in S1412 or S1407 (S1411).

Next, when embedding (forced embedding) of a two-dimensional code hasbeen set for the image forming device, the image forming devicedetermines whether or not, if the two-dimensional code is embedded, thetwo-dimensional codes overlaps each other (S1409). Specifically, theimage forming device determines, when overlying the print data overlaidin S1412 or S1407 onto a two-dimensional code to be embedded accordingto the setting, whether a two-dimensional code in the print dataoverlaid in S1412 or S1407 overlaps a two-dimensional code embeddedaccording to the setting. If the two-dimensional code in the print dataoverlaid in S1412 or S1407 overlaps the two-dimensional code embeddedaccording to the setting, the image forming device determines whether ithas been set to make a print even if the two-dimensional codes overlapeach other (S1413). When it has been set to make a print even if thetwo-dimensional codes overlap each other, the image forming deviceperforms printing (S1411). If it has been set not to perform printingwhen the two-dimensional codes overlap each other, the image formingdevice cancels the printing job (S1414). Furthermore, if it isdetermined in S1409 that two-dimensional codes in the print dataoverlaid in S1412 or S1407 do not overlap a two-dimensional codeembedded according to the setting, the image forming device proceeds toS1410. In S1410, the image forming device overlays two-dimensional codesin the print data overlaid in S1412 or S1407 onto a two-dimensional codeembedded according to the setting (S1410) and prints data overlaid inS1410 (S1411).

As discussed above, the image forming device determines whether atwo-dimensional code is included in an input image, whether addition ofa two-dimensional code has been set for the image forming device, andwhether a two-dimensional code is included in form data to be overlaidonto the input image. The image forming device then determines whether aprintout can be provided according to the results of the threedeterminations, and switches the two-dimensional codes of the printout.

Furthermore, the image forming device may be configured so as to have aspecifying unit, a first detecting unit, a first synthesized imageforming unit, a storage, a second detecting unit, a second synthesizedimage forming unit, and an output unit which performs processingdiscussed below.

The specifying unit specifies overlaying a first input image (printdata) onto a first coded image (first two-dimensional code).

The first detecting unit detects whether a second coded image (secondtwo-dimensional code) is included in the first input image (print data).

If the first detecting unit detects a second coded image (secondtwo-dimensional code), the first synthesized image forming unit does notoverlay the first input image (print data) onto the first coded image(first two-dimensional code). In contrast, if the first detecting unitdetects no second coded image (second two-dimensional code), the firstsynthesized image forming unit overlays the first input image (printdata) onto the first coded image (first two-dimensional code).

The storage stores a second input image (form data).

The second detecting unit detects whether a third coded image (thirdtwo-dimensional code) is included in the second input image (form data).

If the second detecting unit detects the third coded image (thirdtwo-dimensional code), the second synthesized image forming unitoverlays a first synthesized image output by the first synthesized imageforming unit onto a second input image (form data) including no thirdcoded image (third two-dimensional code). In contrast, if the seconddetecting unit detects no third coded image (third two-dimensionalcode), the second synthesized image forming unit overlays a firstsynthesized image output by the first synthesized image forming unit anda second input image (form data) including the third coded image (thirdtwo-dimensional code).

The output unit outputs a second synthesized image by the secondsynthesized image forming unit.

According to the fifth embodiment, when printing print data in which adocument in which a two-dimensional code has already been embedded isoverlaid onto form data in which a two-dimensional code has already beenembedded, the two-dimensional codes can be prevented from beingcorrupted even if a new two-dimensional code is added and thus acquiredprint data is printed.

Other Embodiments

It is assumed in the above description that form data is received from ahost computer. However, form data may be input from any device capableof transferring image data such as a scanner connected with an imageforming device.

In the first to third embodiments, it is discussed as an example to copya document input from a scanner connected with an image forming device.However, print data may be input from any device capable of transferringimage data to an image forming device as in the case that print datareceived from a host computer is printed like the fourth or fifthembodiment.

The objects of the present invention can also be achieved by a computer(or a CPU or an MPU) of a system or a device reading a program code forachieving operations (steps) configured as shown in the aboveembodiments recorded in a recording medium and executing the programcode. The recording medium is a computer-readable recording medium. Inthis case, the program code itself read from the computer-readablerecording medium realizes the functions of the above embodiments. Forthis reason, the program code and the recording medium in which theprogram code is recorded also constitute one of the present inventions.

As a recording medium for providing a program code, for example, afloppy (registered trademark) disk, a hard disk, an optical disk, amagneto-optical disk, a CD-ROM, a CD-R, a magnetic tape, a nonvolatilememory card, a ROM, or the like may be used.

It is also included in the present invention that an operating system(OS) or the like running on a computer on the basis of the instructionsof the program code performs part or all of actual processing by whichthe functions of the above embodiments are realized.

In addition, a program code read from a recording medium is written in amemory provided in a function expanding board inserted in a computer orin a function expanding unit connected with a computer. After that,based on the instructions of the program code, a CPU or the likeprovided in the function expanding board or the function expanding unitperforms part or all of actual processing by which the functions of theabove embodiments are realized.

While the present invention has been discussed with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application Nos.2007-228148, filed Sep. 3, 2007, and 2008-025744, filed Feb. 5, 2008,all of which are hereby incorporated by reference herein in theirentirety.

What is claimed is:
 1. A method comprising: determining whether anaddition of an additional two-dimensional code to an input image is set;determining whether a two-dimensional code is already included in theinput image; determining, in a case where an addition of an additionaltwo-dimensional code to the input image is set and a two-dimensionalcode is already included in the input image, whether the input imageshould be output; and printing the input image, in a case where theinput image should be output, after adding the additionaltwo-dimensional code to an area in the input image based on a positionof the two-dimensional code already included in the input image.
 2. Amethod comprising: determining whether an addition of an additionaltwo-dimensional code to an input image is set; determining whether atwo-dimensional code is already included in the input image; andprinting the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image based on a position of the two-dimensional code alreadyincluded in the input image.
 3. The method according to claim 2, whereinthe printing includes printing the input image, in the case where anaddition of an additional two-dimensional code to the input image isdetermined to be set and a two-dimensional code is determined to bealready included in the input image, after adding the additionaltwo-dimensional code to an area in the input image based on a positionof the two-dimensional code already included in the input image so thatat least apart of information included in the two-dimensional coderemains in the printed image.
 4. A method comprising: determiningwhether an addition of an additional two-dimensional code to an inputimage is set; determining whether a two-dimensional code is alreadyincluded in the input image; and printing the input image, in a casewhere an addition of an additional two-dimensional code to the inputimage is determined to be set and a two-dimensional code is determinedto be already included in the input image, after adding the additionaltwo-dimensional code to an area in the input image, the area having aposition overlapping with a position of the two-dimensional code alreadyincluded in the input image.
 5. A method comprising: determining whetheran addition of an additional two-dimensional code to an input image isset; determining whether a two-dimensional code is already included inthe input image; and printing the input image, in a case where anaddition of an additional two-dimensional code to the input image isdetermined to be set and a two-dimensional code is determined to bealready included in the input image, after adding the additionaltwo-dimensional code to an area in the input image, the area having aposition overlapping with a position of the two-dimensional code alreadyincluded in the input image so that at least a part of informationincluded in the two-dimensional code remains in the printed image.
 6. Amethod comprising: determining whether an addition of an additionaltwo-dimensional code to an input image is set; determining whether atwo-dimensional code is already included in the input image; andprinting the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image, the area having a position overlapping with a positionof the two-dimensional code already included in the input image so thatat least a part of information included in the two-dimensional code isable to be obtained from the printed image.
 7. An apparatus comprising:a unit configured to determine whether an addition of an additionaltwo-dimensional code to an input image is set; a unit configured todetermine whether a two-dimensional code is already included in theinput image; and a unit configured to output the input image, in a casewhere an addition of an additional two-dimensional code to the inputimage is determined to be set and a two-dimensional code is determinedto be already included in the input image, after adding the additionaltwo-dimensional code to an area in the input image based on a positionof the two-dimensional code already included in the input image.
 8. Theapparatus according to claim 7, wherein the unit configured to outputthe input image outputs the input image, in the case where an additionof an additional two-dimensional code to the input image is determinedto be set and a two-dimensional code is determined to be alreadyincluded in the input image, after adding the additional two-dimensionalcode to an area in the input image based on a position of thetwo-dimensional code already included in the input image so that atleast apart of information included in the two-dimensional code remainsin the printed image.
 9. An apparatus comprising: a unit configured todetermine whether an addition of an additional two-dimensional code toan input image is set; a unit configured to determine whether atwo-dimensional code is already included in the input image; and a unitconfigured to output the input image, in a case where an addition of anadditional two-dimensional code to the input image is determined to beset and a two-dimensional code is determined to be already included inthe input image, after adding the additional two-dimensional code to anarea in the input image, the area having a position overlapping with aposition of the two-dimensional code already included in the inputimage.
 10. An apparatus comprising: a unit configured to determinewhether an addition of an additional two-dimensional code to an inputimage is set; a unit configured to determine whether a two-dimensionalcode is already included in the input image; and a unit configured tooutput the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image, the area having a position overlapping with a positionof the two-dimensional code already included in the input image so thatat least a part of information included in the two-dimensional coderemains in the output image.
 11. An apparatus comprising: a unitconfigured to determine whether an addition of an additionaltwo-dimensional code to an input image is set; a unit configured todetermine whether a two-dimensional code is already included in theinput image; and a unit configured to output the input image, in a casewhere an addition of an additional two-dimensional code to the inputimage is determined to be set and a two-dimensional code is determinedto be already included in the input image, after adding the additionaltwo-dimensional code to an area in the input image, the area having aposition overlapping with a position of the two-dimensional code alreadyincluded in the input image so that at least a part of informationincluded in the two-dimensional code is able to be obtained from theoutput image.
 12. A non-transitory computer-readable recording mediumhaving computer-executable instructions for performing a method, themethod comprising: determining whether an addition of an additionaltwo-dimensional code to an input image is set; determining whether atwo-dimensional code is already included in the input image; andoutputting the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image based on a position of the two-dimensional code alreadyincluded in the input image.
 13. The non-transitory computer readablerecording medium according to claim 12, wherein outputting includesoutputting the input image, in the case where an addition of anadditional two-dimensional code to the input image is determined to beset and a two-dimensional code is determined to be already included inthe input image, after adding the additional two-dimensional code to anarea in the input image based on a position of the two-dimensional codealready included in the input image so that at least apart ofinformation included in the two-dimensional code remains in the printedimage.
 14. A non-transitory computer-readable recording medium havingcomputer-executable instructions for performing a method, the methodcomprising: determining whether an addition of an additionaltwo-dimensional code to an input image is set; determining whether atwo-dimensional code is already included in the input image; andoutputting the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image, the area having a position overlapping with a positionof the two-dimensional code already included in the input image.
 15. Anon-transitory computer-readable recording medium havingcomputer-executable instructions for performing a method, the methodcomprising: determining whether an addition of an additionaltwo-dimensional code to an input image is set; determining whether atwo-dimensional code is already included in the input image; andoutputting the input image, in a case where an addition of an additionaltwo-dimensional code to the input image is determined to be set and atwo-dimensional code is determined to be already included in the inputimage, after adding the additional two-dimensional code to an area inthe input image, the area having a position overlapping with a positionof the two-dimensional code already included in the input image so thatat least a part of information included in the two-dimensional coderemains in the output image.
 16. A non-transitory computer-readablerecording medium having computer-executable instructions for performinga method, the method comprising: determining whether an addition of anadditional two-dimensional code to an input image is set; determiningwhether a two-dimensional code is already included in the input image;and outputting the input image, in a case where an addition of anadditional two-dimensional code to the input image is determined to beset and a two-dimensional code is determined to be already included inthe input image, after adding the additional two-dimensional code to anarea in the input image, the area having a position overlapping with aposition of the two-dimensional code already included in the input imageso that at least a part of information included in the two-dimensionalcode is able to be obtained from the output image.